-- GENERATED SPELL FOR [Coilskar Wrangler] --


function spell0_22877(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(15284,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22877', 677, 1)
end

function spell1_22877(pUnit, Event) --@Electric Spur,n/a--
pUnit:FullCastSpellOnTarget(40076,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22877', 3000, 1)
end

function spell2_22877(pUnit, Event) --@Lightning Prod,n/a--
pUnit:FullCastSpellOnTarget(40066,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22877', 3000, 1)
end

function Sorts_22877(pUnit, Event)
local choix_sorts_22877 = math.random(0, 2)
if choix_sorts_22877 == 0 then
pUnit:RegisterEvent('spell0_22877', 1, 1)
end
if choix_sorts_22877 == 1 then
pUnit:RegisterEvent('spell1_22877', 1, 1)
end
if choix_sorts_22877 == 2 then
pUnit:RegisterEvent('spell2_22877', 1, 1)
end
end

function mob22877_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_22877', math.random(1500, 3000), 1)
end

function mob22877_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22877_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22877_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(22877, 1, 'mob22877_Action')
RegisterUnitEvent(22877, 2, 'mob22877_Leave')
RegisterUnitEvent(22877, 3, 'mob22877_Kill')
RegisterUnitEvent(22877, 4, 'mob22877_Die')
